import uiautomator2 as u2  # 导入需要用到的库

import time

if __name__ == '__main__':
    d = u2.connect()
    d.app_start('com.tencent.mm')
    print(d.info)
    time.sleep(10)
    height = d.info.get("displayHeight")
    width = d.info.get("displayWidth")
    t_pos_procent = {"x": 0.917526, "y": 0.0710145}
    t_pos = [int(t_pos_procent.get("x") * width), int(t_pos_procent.get("y") * height)]
    print(t_pos)
    d.click(*t_pos)

    time.sleep(10)
    d.app_stop('com.tencent.mm')
